<ion-view>
  <ion-header-bar class="bar bar-header header">
    <button class="button hd-city-btn" on-touch="go2Lbs()" ng-if="!city.city_name"><span class="text">广州市</span><i class="hd-city-icon"></i></button>
    <button class="button hd-city-btn" on-touch="go2Lbs()" ng-if="city.city_name"><span class="text">{{city.city_name| limitTo : 3}}</span><span ng-if="city.city_name.length>3">...</span><i class="hd-city-icon"></i></button>
    <div class="hd-tad-main">
      <ul>
        <li><a on-touch="showMeeting()" ng-class="{'cur':isShowMeeting}">约局</a></li>
        <li><a on-touch="showHome()" ng-class="{'cur':!isShowMeeting}">酒窝</a></li>
      </ul>
    </div>
    <a ng-href="#/msg-box" class="button hd-remind-btn button-winered" type="button">
      <em class="hd-remind-num" ng-if="msgBoxCount" ng-bind="msgBoxCount"></em>
    </a>
    <a ng-href="#/calendar" class="button hd-date-btn button-winered" type="button"></a>
  </ion-header-bar>
  <!--on-touch="touchIndex()" on-swipe-left="swipeLeft()" on-swipe-right="swipeRight()"-->
  <ion-content class="gray-bg" has-bouncing="true" on-swipe-left="swipeLeft()" on-swipe-right="swipeRight()">
    <!--<tab-slide-box tab="0">
      <ion-slide-box show-pager="false" on-slide-changed="slideHasChanged($index)" delegate-handle="delegate-handle">
        <ion-slide>-->
    <div ng-show="isShowMeeting">
          <ion-content class="gray-bg">
            <ion-refresher
              pulling-text="下拉刷新..."
              on-refresh="doRefreshMeeting()">
            </ion-refresher>
            <div>
              <div class="activity-cal-hd">
                <button class="activity-cal-hd-perv" type="button" on-touch="preWeek(weekDay[0].timeformat)"></button>
                <em class="activity-cal-hd-date">{{nowDate|date:'yyyy年MM月'}}</em>
                <button class="activity-cal-hd-next" type="button" on-touch="nextWeek(weekDay[6].timeformat)"></button>
              </div>
              <div class="activity-cal-bd">
                <div class="row">
                  <div class="col activity-cal-th">日</div>
                  <div class="col activity-cal-th">一</div>
                  <div class="col activity-cal-th">二</div>
                  <div class="col activity-cal-th">三</div>
                  <div class="col activity-cal-th">四</div>
                  <div class="col activity-cal-th">五</div>
                  <div class="col activity-cal-th">六</div>
                </div>
                <div class="row">
                  <div class="col activity-cal-td" ng-repeat="item in weekDay" ng-class="{'now-day':item.selected}">
                    <a ng-click='selectDay("{{item.timeformat}}")'>
                      <i class="calendar-td-icon" ng-if="item.haveMeeting&&!item.selected"></i>
                      <em class="calendar-news-txt">{{item.time | date:'dd'}}</em>
                      <em class="calendar-old-txt" ng-bind="item.nong_time">三十</em>
                    </a>
                  </div>
                </div>
                <!--约局列表-->
                <div class="list">
                  <ul>
                    <li class="card card-item-li" ng-repeat="meeting in meetingList">
                      <a ng-href="#/date-details/{{meeting.mm_id}}">
                        <div class="item item-image" >
                          <div class="card-item-img">
                            <div class="card-item-bg">
                              <div class="card-item-con">
                                <h3 ng-bind="meeting.mm_title">周末一起以酒会友</h3>

                                <p class="card-item-blue"><i class="card-addr-icon"></i>{{meeting.mm_address}}</p>

                                <p><i class="card-time-icon"></i>{{meeting.mm_time | date:"yyyy-MM-dd HH:mm"}}</p>
                              </div>
                            </div>
                            <img ng-src="{{picPath}}middle_{{meeting.mm_img_url}}" style="height:250px;width:100%"/>
                            <!--<img style="width:100%;" ng-src="{{picPath}}big_{{meeting.mm_img_url}}" />-->
                          </div>
                        </div>

                        <div class="item item-avatar card-item-tit">
                          <div class="card-user-hd">
                            <a>
                              <div class="card-user-hd-pic">
                                <img ng-src="{{picPath}}{{meeting.member_img_url}}" alt=""/>
                                <i class="card-user-hd-icon"><img ng-src="{{picPath}}{{meeting.mr_img_url}}" alt=""/></i>
                              </div>
                            </a>
                          </div>
                          <h2 class="card-user-hd-name" ng-bind="meeting.member_name"></h2>

                          <div class="tabs tabs-icon-only card-item-ctrl">
                            <!--<a class="tab-item" on-touch="showMeetingShare(meeting.mm_id)">-->
                            <a class="tab-item" on-touch="showMeetingShare(meeting.mm_id)" ng-show="isShareShow">
                              <i class="icon card-share-icon"></i>
                            </a>
                            <a class="tab-item" ng-click="collectMeeting($index,meeting.mm_id)">
                              <i class="icon card-collect-icon" ng-class="{'active':meeting.mcmeetStatus}"></i>
                            </a>
                            <a class="tab-item" ng-click="likeMeeting($index,meeting.mm_id)">
                              <i class="icon card-praise-icon" ng-class="{'active':meeting.lmeetStatus}"></i>
                            </a>
                            <a class="tab-item" ng-href="#/meetingComment/{{meeting.mm_id}}">
                              <i class="icon card-comment-icon"><em class="ctrl-nav-num" ng-bind="meeting.mm_comment_num"></em></i>
                            </a>
                          </div>
                        </div>
                      </a>
                    </li>
                  </ul>
                </div>
              </div>
            </div>
            <!--约局结束-->
          </ion-content>
    </div>
      <!--    </ion-slide>
        <ion-slide>-->
    <div ng-show="!isShowMeeting">
          <ion-content class="gray-bg">
            <ion-refresher
              pulling-text="下拉刷新..."
              on-refresh="doRefreshHome()">
            </ion-refresher>
            <!--酒窝开始-->
            <!--<div ng-if="!isShowMeeting && (member||homeList)">-->
            <div ng-show="member||homeList">
              <div class="dimple-hd-pic">
                <div class="dimple-hd-bg">
                  <div class="dimple-hd-user">
                    <div class="dimple-hd-user-box" ng-click="go2OtherHome(member.member_id)">
                      <img ng-src="{{picPath}}{{member.member_img_url}}" alt=""/>
                      <i class="dimple-hd-user-icon"><img ng-src="{{picPath}}{{member.mr_img_url}}" alt=""/></i>
                    </div>
                    <div class="dimple-hd-user-tit" ng-bind="member.member_name"></div>
                  </div>
                </div>
              </div>
              <div class="list card dimple-card-item" ng-repeat="item in homeList">
                <!--本地的信息-->
                <div ng-if="item.isLocal">
                  <div class="item item-avatar">
                    <div class="fr"><ion-spinner icon="ios-small"></ion-spinner></div>
                    <div class="dimple-card-user-hd">
                      <div class="dimple-card-user-hd-pic" ng-click="go2OtherHome(item.homeMemberInfo.member_id)">
                        <img ng-src="{{picPath}}{{item.homeMemberInfo.member_img_url}}" alt=""/>
                        <i class="dimple-card-user-hd-icon"><img ng-src="{{picPath}}{{item.homeMemberInfo.mr_img_url}}" alt=""/></i>
                      </div>
                    </div>
                    <h2 ng-bind="item.homeMemberInfo.member_name"></h2>
                    <p style="font-size:11px" ng-bind="item.mh_create_time"></p>
                  </div>
                  <div class="item item-body dimple-card-content">
                    <p  ng-bind="item.mh_content"></p>

                    <div class="dimple-card-photo-list" ng-if="item.picSrc.length>1">
                      <div class="dimple-card-photo-item" ng-repeat="pic in item.picSrc">
                        <a ng-click="showBigImage($parent.$index,$index)" class="dimple-card-photo-li-pic">
                          <img ng-src="{{pic}}" onload="handleImg(80,80)" class="change_img" alt=""/></a>
                      </div>
                    </div>
                    <div ng-if="item.picSrc.length==1" style="padding:5px 0">
                      <img ng-src="{{item.picSrc[0]}}" ng-click="showBigImage($parent.$index,$index)" ng-style="{width:item.picSrc[0].w/item.picSrc[0].h>=5||item.picSrc[0].h/item.picSrc[0].w>=5?'20%':'50%'}" alt=""/>
                    </div>
                    <div class="dimple-card-address" ng-bind="item.mh_location"></div>
                  </div>
                  <!--底部的四个按钮-->
                  <div class="item tabs dimple-card-tad">
                    <div class=" tabs tabs-icon-only card-item-ctrl">
                      <a class="tab-item disabled">
                        <i class="icon card-share-icon"></i>
                      </a>
                      <a class="tab-item disabled">
                        <i class="icon card-collect-icon"></i>
                      </a>
                      <a class="tab-item disabled">
                        <i class="icon card-praise-icon">
                        </i>
                      </a>
                      <a class="tab-item disabled">
                        <i class="icon card-comment-icon"><em class="ctrl-nav-num" ng-bind="item.mh_comment_num"></em></i>
                      </a>
                    </div>
                  </div>
                </div>
                <!--非本地的信息-->
                <div ng-if="!item.isLocal">
                  <div class="item item-avatar">
                    <button class="my-dimple-del-btn fr" type="button" ng-if="item.mySelfRelease" on-touch="deleteHome($index)"></button>
                    <button type="button" class="button button-small dimple-care-btn fr" ng-click="foucsMember(item.member_id,$index)" ng-if="!item.isAttend&&!item.mySelfRelease">
                      <i class="dimple-care-icon"></i>关注
                    </button>
                    <button type="button" class="button button-small dimple-care-btn fr" ng-click="noFoucsMember(item.member_id,$index)" ng-if="item.isAttend&&!item.mySelfRelease">取消关注</button>

                    <div class="dimple-card-user-hd">
                      <div class="dimple-card-user-hd-pic" ng-click="go2OtherHome(item.homeMemberInfo.member_id)">
                        <img ng-src="{{picPath}}{{item.homeMemberInfo.member_img_url}}" alt=""/>
                        <i class="dimple-card-user-hd-icon"><img ng-src="{{picPath}}{{item.homeMemberInfo.mr_img_url}}" alt=""/></i>
                      </div>
                    </div>
                    <h2 ng-bind="item.homeMemberInfo.member_name"></h2>
                    <p style="font-size:11px" ng-bind="item.mh_create_time"></p>
                  </div>
                  <div class="item item-body dimple-card-content">
                    <p ng-bind="item.mh_content"></p>
                    <div class="dimple-card-photo-list" ng-if="item.picSrc.length>1">
                      <div class="dimple-card-photo-item" ng-repeat="pic in item.picSrc">
                        <a ng-click="showBigImage($parent.$index,$index)" class="dimple-card-photo-li-pic">
                          <img ng-src="{{picPath}}{{pic.src}}" alt=""/>
                        </a>
                      </div>
                    </div>
                    <div ng-if="item.picSrc.length==1" style="padding:5px 0">
                      <img ng-src="{{picPath}}{{item.picSrc[0].src}}" ng-click="showBigImage($parent.$index,$index)" ng-style="{width:item.picSrc[0].w/item.picSrc[0].h>=5||item.picSrc[0].h/item.picSrc[0].w>=5?'20%':'45%'}"   alt=""/>
                    </div>
                    <div class="dimple-card-address" ng-bind="item.mh_location"></div>
                  </div>
                  <!--底部的四个按钮-->
                  <div class="item tabs dimple-card-tad">
                    <div class=" tabs tabs-icon-only card-item-ctrl">
                      <a class="tab-item"  ng-show="isShareShow">
                        <i class="icon card-share-icon" on-touch="showHomeShare(item.mh_id)"></i>
                      </a>
                      <a class="tab-item">
                        <i class="icon card-collect-icon" ng-click="collectHome($index,item.mh_id)" ng-class="{'active':item.mchomeStatus}"></i>
                      </a>
                      <a class="tab-item">
                        <i class="icon card-praise-icon" ng-click="likeHome($index,item.mh_id)" ng-class="{'active':item.lhomeStatus}">
                        </i>
                      </a>
                      <a class="tab-item" ng-href="#/homeComment/{{item.mh_id}}">
                        <i class="icon card-comment-icon"><em class="ctrl-nav-num" ng-bind="item.mh_comment_num"></em></i>
                      </a>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <ion-infinite-scroll
              on-infinite="loadMore()" ng-if="hasNextPage()"
              distance="1%"></ion-infinite-scroll>
            <!--酒窝结束-->
          </ion-content>
    </div>
      <!--  </ion-slide>
        </ion-slide-box>
      </tab-slide-box>-->
  </ion-content>
  <!--<a ng-class="{'fix-button':showWineGlasses,'fix-button-hidden':!showWineGlasses}" on-touch="goToWineIndex()" type="button"></a>-->
  <a ng-class="{'fix-add-btn-hidden':!addIsActive,'fix-add-btn':addIsActive}" on-touch="release()" type="button"></a>
</ion-view>

